
from .api_verify import ApiVerify

from flask import Flask, request, Blueprint

from . import app_verify

import random

@app_verify.route('/verify', methods=['GET', 'POST'])
    
def verify():

    methods = request.method

    info = request.args

    openid = info.get('openid')

    phone = info.get('phone')

    verify_code = random.randint(100000,999999)

    with ApiVerify() as conn_api:

        result_info = conn_api.verify_code(methods, openid, phone, verify_code)

    return result_info

